import request from '../utils/request.js'

// 请求文章列表

const getArtLists = (params = {}) => request.get('/artList', { params })

// 增加文章

const addArt = (params = {}) => request.post('/addArt', params )

// 根据id获取文章详情
const getArt = (id) => request.post('/getArt', {id} )
// 更新文章
const updateArt = (params = {})=> request.post('/updateArt', params )
const delArt = (id) => request.post('/delArt', {id} )
// 用户登录
const doLogin = (params={})=>request.post('/login', params )
export {
  getArtLists,
  addArt,
  getArt,
  updateArt,
  delArt,
  doLogin
}